﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class TaiKhoanBus
    {
        public IEnumerable<TAIKHOAN> TimKiem(string ID, string Pass)
        {
            TaiKhoanDao tkDao = new TaiKhoanDao();
            IEnumerable<TAIKHOAN> tkDto;
            tkDto = tkDao.TimKiem(ID, Pass);
            return tkDto;
        }
        public IEnumerable<TAIKHOAN> DanhSach()
        {
            TaiKhoanDao tkDao = new TaiKhoanDao();
            return tkDao.DanhSach();
        }

        public IEnumerable<TAIKHOAN> Tim(string ID)
        {
            TaiKhoanDao tkDao = new TaiKhoanDao();
            IEnumerable<TAIKHOAN> tkDto;
            tkDto = tkDao.Tim(ID);
            return tkDto;
        }
        public void TaoTaiKhoan(TAIKHOAN TaiKhoan)
        {
            TaiKhoanDao tkDao = new TaiKhoanDao();
            tkDao.TaoTaiKhoan(TaiKhoan);
        }
        public void XoaTaiKhoan(TAIKHOAN TaiKhoan)
        {
            TaiKhoanDao tkDao = new TaiKhoanDao();
            tkDao.XoaTaiKhoan(TaiKhoan);
        }
        public string LayMatKhau(string ID)
        {
            TaiKhoanDao tkDao = new TaiKhoanDao();
            return tkDao.LayMatKhau(ID);
        }
        public void DoiMatKhau(string ID, string MK)
        {
            TaiKhoanDao tkDao = new TaiKhoanDao();
            tkDao.DoiMatKhau(ID, MK);
        }
    }
}
